home *** CD-ROM | disk | FTP | other *** search
- /*
- File: QTVRFrmt.h
-
- Contains: The QuickTime™ VR File Format Structures Public Header File version 2.0
-
- Written by: The QuickTime™ VR Team
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef __QTVRFRMT__
- #define __QTVRFRMT__
-
- #ifndef __MOVIES__
- #include <Movies.h>
- #endif
-
- #ifndef __QTVR__
- #include <QTVR.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- typedef float Float32; // IEEE 754 32-bit single format
-
- // File Format Version numbers
- #define kQTVRMajorVersion (2)
- #define kQTVRMinorVersion (0)
-
- // User data type for the Movie Controller type specifier
- enum {
- kQTControllerType = 'ctyp', // Atom & ID of where our
- kQTControllerID = 1 // … controller name is stored
- };
-
- // VRWorld atom types
- enum {
- kQTVRWorldHeaderAtomType = 'vrsc',
- kQTVRImagingParentAtomType = 'imgp',
- kQTVRPanoImagingAtomType = 'impn',
- kQTVRObjectImagingAtomType = 'imob',
- kQTVRNodeParentAtomType = 'vrnp',
- kQTVRNodeIDAtomType = 'vrni',
- kQTVRNodeLocationAtomType = 'nloc'
- };
-
- // NodeInfo atom types
- enum {
- kQTVRNodeHeaderAtomType = 'ndhd',
- kQTVRHotSpotParentAtomType = 'hspa',
- kQTVRHotSpotAtomType = 'hots',
- kQTVRHotSpotInfoAtomType = 'hsin',
- kQTVRLinkInfoAtomType = 'link'
- };
-
- // Miscellaneous atom types
- enum {
- kQTVRStringAtomType = 'vrsg',
- kQTVRPanoSampleDataAtomType = 'pdat',
- kQTVRObjectInfoAtomType = 'obji',
- kQTVRAngleRangeAtomType = 'arng',
- kQTVRTrackRefArrayAtomType = 'tref',
- kQTVRPanConstraintAtomType = 'pcon',
- kQTVRTiltConstraintAtomType = 'tcon',
- kQTVRFOVConstraintAtomType = 'fcon'
- };
-
- // Track reference types
- enum {
- kQTVRImageTrackRefType = 'imgt',
- kQTVRHotSpotTrackRefType = 'hott'
- };
-
- // Old hot spot types
- enum {
- kQTVRHotSpotNavigableType = 'navg'
- };
-
- // Valid bits used in VRLinkHotSpotAtom
- enum {
- kQTVRValidPan = 1 << 0,
- kQTVRValidTilt = 1 << 1,
- kQTVRValidFOV = 1 << 2,
- kQTVRValidViewCenter = 1 << 3
- };
-
-
- // Values for flags field in VRPanoSampleAtom
- enum {
- kQTVRPanoFlagHorizontal = 1 << 0,
- kQTVRPanoFlagLast = 1 << 31
- };
-
-
- // Values for locationFlags field in VRNodeLocationAtom
- enum {
- kQTVRSameFile = 0
- };
-
-
- // Header for QTVR track's Sample Description record (vrWorld atom container is appended)
- typedef struct QTVRSampleDescription {
- UInt32 size; // total size of the QTVRSampleDescription
- UInt32 type; // must be 'qtvr'
-
- UInt32 reserved1; // must be zero
- UInt16 reserved2; // must be zero
- UInt16 dataRefIndex; // must be zero
-
- UInt32 data; // Will be extended to hold vrWorld QTAtomContainer
-
- } QTVRSampleDescription, *QTVRSampleDescriptionPtr, **QTVRSampleDescriptionHandle;
-
-
- //=================================================================================================
- // Definitions and structures used in the VRWorld QTAtomContainer
- //-------------------------------------------------------------------------------------------------
-
-
- typedef struct VRStringAtom {
- UInt16 stringUsage;
- UInt16 stringLength;
-
- unsigned char string[4];
- } VRStringAtom, *VRStringAtomPtr;
-
-
- typedef struct VRWorldHeaderAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- QTAtomID nameAtomID;
- UInt32 defaultNodeID;
- UInt32 vrWorldFlags;
-
- UInt32 reserved1;
- UInt32 reserved2;
- } VRWorldHeaderAtom, *VRWorldHeaderAtomPtr;
-
- // Valid bits used in VRPanoImagingAtom
- enum {
- kQTVRValidCorrection = 1 << 0,
- kQTVRValidQuality = 1 << 1,
- kQTVRValidDirectDraw = 1 << 2,
- kQTVRValidFirstExtraProperty = 1 << 3
- };
-
- typedef struct VRPanoImagingAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- UInt32 imagingMode;
- UInt32 imagingValidFlags;
-
- UInt32 correction;
- UInt32 quality;
- UInt32 directDraw;
- UInt32 imagingProperties[6]; // for future properties
-
- UInt32 reserved1;
- UInt32 reserved2;
- } VRPanoImagingAtom, *VRPanoImagingAtomPtr;
-
- typedef struct VRNodeLocationAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- OSType nodeType;
- UInt32 locationFlags;
- UInt32 locationData;
-
- UInt32 reserved1;
- UInt32 reserved2;
- } VRNodeLocationAtom, *VRNodeLocationAtomPtr;
-
-
- //=================================================================================================
- // Definitions and structures used in the Nodeinfo QTAtomContainer
- //-------------------------------------------------------------------------------------------------
-
- typedef struct VRNodeHeaderAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- OSType nodeType;
- QTAtomID nodeID;
- QTAtomID nameAtomID;
- QTAtomID commentAtomID;
-
- UInt32 reserved1;
- UInt32 reserved2;
- } VRNodeHeaderAtom, *VRNodeHeaderAtomPtr;
-
-
- typedef struct VRAngleRangeAtom {
- Float32 minimumAngle;
- Float32 maximumAngle;
- } VRAngleRangeAtom, *VRAngleRangeAtomPtr;
-
-
- typedef struct VRHotSpotInfoAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- OSType hotSpotType;
- QTAtomID nameAtomID;
- QTAtomID commentAtomID;
-
- SInt32 cursorID [3];
-
- // canonical view for this hot spot
- Float32 bestPan;
- Float32 bestTilt;
- Float32 bestFOV;
- FloatPoint bestViewCenter;
-
- // Bounding box for this hot spot
- Rect hotSpotRect;
-
- UInt32 flags;
- UInt32 reserved1;
- UInt32 reserved2;
- } VRHotSpotInfoAtom, *VRHotSpotInfoAtomPtr;
-
-
- typedef struct VRLinkHotSpotAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- UInt32 toNodeID;
-
- UInt32 fromValidFlags;
- Float32 fromPan;
- Float32 fromTilt;
- Float32 fromFOV;
- FloatPoint fromViewCenter;
-
- UInt32 toValidFlags;
- Float32 toPan;
- Float32 toTilt;
- Float32 toFOV;
- FloatPoint toViewCenter;
-
- Float32 distance;
-
- UInt32 flags;
- UInt32 reserved1;
- UInt32 reserved2;
- } VRLinkHotSpotAtom, *VRLinkHotSpotAtomPtr;
-
-
- //=================================================================================================
- // Definitions and structures used in Panorama and Object tracks
- //-------------------------------------------------------------------------------------------------
-
- typedef struct VRPanoSampleAtom {
- UInt16 majorVersion;
- UInt16 minorVersion;
-
- UInt32 imageRefTrackIndex; // track reference index of the full res image track
- UInt32 hotSpotRefTrackIndex; // track reference index of the full res hot spot track
-
- Float32 minPan;
- Float32 maxPan;
- Float32 minTilt;
- Float32 maxTilt;
- Float32 minFieldOfView;
- Float32 maxFieldOfView;
-
- Float32 defaultPan;
- Float32 defaultTilt;
- Float32 defaultFieldOfView;
-
- // Info for highest res version of image track
- UInt32 imageSizeX; // pixel width of the panorama (e.g. 768)
- UInt32 imageSizeY; // pixel height of the panorama (e.g. 2496)
- UInt16 imageNumFramesX; // diced frames wide (e.g. 1)
- UInt16 imageNumFramesY; // diced frames high (e.g. 24)
-
- // Info for highest res version of hotSpot track
- UInt32 hotSpotSizeX; // pixel width of the hot spot panorama (e.g. 768)
- UInt32 hotSpotSizeY; // pixel height of the hot spot panorama (e.g. 2496)
- UInt16 hotSpotNumFramesX; // diced frames wide (e.g. 1)
- UInt16 hotSpotNumFramesY; // diced frames high (e.g. 24)
-
- UInt32 flags;
- UInt32 reserved1;
- UInt32 reserved2;
-
- } VRPanoSampleAtom, *VRPanoSampleAtomPtr;
-
- typedef struct VRTrackRefEntry {
- UInt32 trackRefType;
- UInt16 trackResolution;
- UInt32 trackRefIndex;
- } VRTrackRefEntry;
-
- //=================================================================================================
- // Object File format 2.0
- //-------------------------------------------------------------------------------------------------
- enum QTVRPlaySettings {
- kQTVRObjectAnimateViewFramesOn = (1 << 0),
- kQTVRObjectPalindromeViewFramesOn = (1 << 1),
- kQTVRObjectStartFirstViewFrameOn = (1 << 2),
- kQTVRObjectAnimateViewsOn = (1 << 3),
- kQTVRObjectPalindromeViewsOn = (1 << 4),
- kQTVRObjectSyncViewToFrameRate = (1 << 5),
- kQTVRObjectDontLoopViewFramesOn = (1 << 6)
- };
-
- enum QTVRViewSettings {
- kQTVRObjectWrapPanOn = (1 << 0),
- kQTVRObjectWrapTiltOn = (1 << 1),
- kQTVRObjectCanZoomOn = (1 << 2),
- kQTVRObjectReverseHControlOn = (1 << 3),
- kQTVRObjectReverseVControlOn = (1 << 4),
- kQTVRObjectSwapHVControlOn = (1 << 5),
- kQTVRObjectTranslationOn = (1 << 6)
- };
-
- enum ObjectUITypes{
- kGrabberScrollerUI = 1, // "Object"
- kOldJoyStickUI = 2, // "1.0 Object as Scene"
- kJoystickUI = 3, // "Object In Scene"
- kGrabberUI = 4, // "Grabber only"
- kAbsoluteUI = 5 // "Absolute pointer"
- };
-
-
- typedef struct VRObjectSampleAtom {
- UInt16 majorVersion; // kQTVRMajorVersion
- UInt16 minorVersion; // kQTVRMinorVersion
- UInt16 movieType; // ObjectUITypes
- UInt16 viewStateCount; // The number of view states 1 based
- UInt16 defaultViewState; // The default view state number. The number must be 1 to viewStateCount
- UInt16 mouseDownViewState; // The mouse down view state. The number must be 1 to viewStateCount
- UInt32 viewDuration; // The duration of each view including all animation frames in a view
- UInt32 columns; // Number of columns in movie
- UInt32 rows; // Number rows in movie
- Float32 mouseMotionScale; // 180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene.
- Float32 minPan; // Start horizontal pan angle in degrees
- Float32 maxPan; // End horizontal pan angle in degrees
- Float32 defaultPan; // Initial horizontal pan angle in degrees (poster view)
- Float32 minTilt; // Start vertical pan angle in degrees
- Float32 maxTilt; // End vertical pan angle in degrees
- Float32 defaultTilt; // Initial vertical pan angle in degrees (poster view)
- Float32 minFieldOfView; // minimum field of view setting (appears as the maximum zoom effect) must be >= 1
- Float32 fieldOfView; // the field of view range must be >= 1
- Float32 defaultFieldOfView; // must be in minFieldOfView and maxFieldOfView range inclusive
- Float32 defaultViewCenterH;
- Float32 defaultViewCenterV;
-
- Float32 viewRate;
- Float32 frameRate;
- UInt32 animationSettings; // 32 reserved bit fields
- UInt32 controlSettings; // 32 reserved bit fields
-
- } VRObjectSampleAtom, *VRObjectSampleAtomPtr;
-
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif // __QTVRFRMT__
-
-